package message;

import java.io.Serializable;

/**
 * This class is used as a wrapper for all responses sent between proxy and fileserver. 
 * It extends the usual DTO's with a HMAC for integrity control.
 * 
 * @author hansjorghofer
 *
 */
public class ResponseWrapper implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = -2971590040211218449L;
	
	private Response response;
	private String hmac;
	
	public ResponseWrapper(Response response, String hmac) {
		this.response = response;
		this.hmac = hmac;
	}
	
	public Response getResponse() {
		return response;
	}
	
	public String getHmac() {
		return hmac;
	}
	
	@Override
	public String toString() {
		return hmac + " " + response.toString();
	}
}
